package com.cj.library.widget.dialog;

import android.app.Activity;

import com.cj.library.widget.R;

/**
 * Created by peter on 2016/9/19.
 */
public class LoadingDialog {
    private CJDialog dialog;

    public LoadingDialog(Activity aty) {
        dialog = new CJDialog.Builder(aty)
                .setContentView(R.layout.dialog_circle_loading)
                .create();
    }

    public void setMsg(CharSequence msg) {
        dialog.getViewHolder().setText(R.id.dialog_content, msg);
    }

    public void show() {
        dialog.show();
    }

    public void close() {
        dialog.dismiss();
    }
}
